package net.corda.mpcnet.common;

/**
 *  请求结果枚举
 */
public enum RespCode {

    SUCCESS(0, "请求成功"),
    SYS_ERROR(-1, "系统异常"),
    SYS_WARN(9,"业务异常");

    private Integer code;
    private String msg;

    RespCode(Integer code, String msg){
        this.msg = msg;
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "RespCode{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
